<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
        1.Math 是内置对象  数学常数和函数的属性和方法
        MDN ： 内置对象的说明书

        */

        console.log(Math.PI);

        // abs 绝对值 
        console.log(Math.abs('-1')); // 1
        console.log(Math.abs(5));  //5

        // ceil 向上取整 
        console.log(Math.ceil(5.5)); //6
        console.log(Math.ceil(-5.5)); // -5

        //round  四舍五入

        console.log(Math.round(5.2)); // 5
        console.log(Math.round(5.6)); // 6
    </script>
</body>

</html>